<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新建文章</title>
<style type="text/css">
	body{
		background: url("show/images/orpate.png");
		background-repeat: no-repeat;
		background-position: 100% 0;
	}
	.w-e-text::-webkit-scrollbar{
        width: 13px;
        height: 0px;
        background-color: rgb(190, 229, 255);
    }

    .w-e-text::-webkit-scrollbar-button{
        background-color: rgb(153, 182, 201);
    }
    
    .w-e-text::-webkit-scrollbar-thumb{
        background-color: rgb(75, 165, 224);
    }
</style>
</head>
<body>

	<form name="formt" action="${sessionScope.type }" method="post">
		文章标题:<input type="text" name="title" value="${requestScope.title }" required="required">
		文章分类:<select  name="classname">
			<option value="${requestScope.classname }">${requestScope.classname }</option>
			
			
			<c:forEach var="i" items="${sessionScope.classname }">
				<c:if test="${pageScope.i != requestScope.classname}">
					<option value="${i }">${i } </option>
				</c:if>
			</c:forEach>
			
		</select>
	
	 	<div id="div1">
	 		${requestScope.content }
	 	</div>
    	
        <input type="hidden" name="content">
    </form>
    <button onclick="subm()" style="display: block; margin:auto;">提交</button>
    

<script type="text/javascript" charset="UTF-8" src="js/wangEditor.js"></script>
    <script type="text/javascript">
        
    	const E = window.wangEditor;
        const editor = new E('#div1');
        editor.config.uploadImgShowBase64 = true;
		editor.config.excludeMenus = ['emoticon', 'video', 'table'];
        editor.create();
		
		function subm() {
			document.all["content"].value = editor.txt.html();
			document.all["formt"].submit();
		}

</script>
<c:remove scope="session" var="type"/>
<c:remove scope="session" var="classname"/>
</body>
</html>